﻿@using Kendo.Mvc.UI
@model TS2015.Models.TbChucNang

<div class="editor-label">
    <label for="TenCN">Chức năng: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().TextBoxFor(m => m.TenCN))
</div>
<div class="editor-label">
    <label for="TenTat">Tên viết tắt: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().TextBoxFor(m => m.TenTat))
</div>
<div class="editor-label">
    <label for="Link">Link: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().TextBoxFor(m => m.Link))
</div>
<div class="editor-label">
    <label for="CssIcon">Tên icon: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().TextBoxFor(m => m.CssIcon))
</div>
<div class="editor-label">
    <label for="CNCha">Chức năng cha: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().DropDownListFor(m => m.MaCNCha)
            .AutoBind(false)
                    .OptionLabel("Chọn chức năng...")
            .DataTextField("TenCN")
            .DataValueField("MaCN")
        //.Filter("startswith")
            .DataSource(dataSource =>
            {
                dataSource.Read(read => read.Action("GetFuntion", "AccoutManagement"))
                 .ServerFiltering(true);
            })
    )
</div>
<div class="editor-label">
    <label for="ThuTu">Thứ tự: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().TextBoxFor(m => m.ThuTu))
</div>
<div class="editor-label">
    <label for="IsMenu">Là Menu?: </label>
</div>
<div class="editor-field">
    @(Html.CheckBoxFor(m => m.IsMenu))
</div>
<div class="editor-label">
    <label for="TrangThai">Trạng thái: </label>
</div>
<div class="editor-field">
    @(Html.Kendo().DropDownList()
            .Name("TrangThai")
            .BindTo((System.Collections.IEnumerable)ViewBag.TrangThai)
            .DataValueField("Value")
            .DataTextField("Text")
    )
</div>